<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        * {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
        }
        
        body,
         :root {
            width: 100%;
            height: 100%;
        }
        
        .container {
            display: flex;
            width: 100%;
            height: 100%;
            padding: 20px;
            border: 1px solid;
        }
        
        .left-cont {
            flex: 1;
            height: 100%;
            display: flex;
            flex-direction: column;
            border-right: 2px solid rgb(20, 59, 57);
            padding-right: 30px;
        }
        
        .left-cont>.list {
            display: flex;
            flex-direction: column;
            text-align: center;
        }
        
        .left-cont>.list>span {
            border: 1px solid rgb(28, 104, 96);
            height: 40px;
            background-color: rgb(239, 253, 252);
            line-height: 40px;
            transition: all .3s;
        }
        
        .left-cont>.list>.item:hover {
            transform: scale(1.1);
        }
        
        .left-cont>.list>.item {
            margin-left: 20px;
        }
        
        .left-cont>.list>.item-title {
            height: 50px;
            line-height: 50px;
            position: relative;
            background-color: rgb(28, 104, 96);
            color: #fff;
            font-weight: bold;
        }
        /* .left-cont>.list>.item-title:first-of-type {
                border-top: 5px solid;
            } */
        
        .left-cont>.list>.item-title::before {
            content: '';
            display: inline-block;
            border: 10px solid rgb(20, 59, 57);
            border-left-color: transparent;
            border-bottom-color: transparent;
            position: absolute;
            left: 0px;
            bottom: -20px;
        }
        
        .right-cont {
            flex: 4;
            display: flex;
            flex-direction: column;
            width: 100%;
            margin-left: 20px;
        }
        
        .right-cont>thead {
            width: 100%;
            display: flex;
        }
        
        .right-cont>.right-title {
            width: 100%;
            border-bottom: 3px solid rgb(20, 59, 57);
            margin-bottom: 30px;
        }
        
        .right-cont>.right-title>span {
            background-color: rgb(0, 155, 134);
            display: inline-block;
            width: 100px;
            height: 30px;
            text-align: center;
            line-height: 30px;
            font-weight: bold;
            color: #fff;
        }
        
        .right-cont>table {
            border: 1px solid rgb(28, 104, 96);
            text-align: center;
        }
        
        .right-cont>table>* {
            margin: 5px;
        }
        
        .thead {
            height: 50px;
            background-color: rgb(35, 129, 120);
            color: #fff;
        }
        
        .tbtr {
            height: 50px;
        }
        
        .tbtd:hover {
            transition: all .3s;
            transform: scale(1.1);
        }
        
        .tbtr:nth-of-type(n) {
            background-color: rgb(239, 253, 252);
        }
        
        .tbtr:nth-of-type(2n) {
            background-color: #fff;
        }
        
        form>select {
            height: 50px;
            text-align: center;
            font-size: 18px;
            margin-top: 30px;
            border: none;
            border-bottom: 1px solid rgb(20, 59, 57);
            outline: none;
            /* box-shadow: 0px 2px 3px rgba(0, 0, 0, .5); */
            transition: all .3s;
        }
        
        form>select:hover {
            box-shadow: 0px 2px 7px rgba(0, 0, 0, .7);
        }
        
        form>select>option {
            font-size: 14px;
        }
        
        form>button,
        form a {
            font-size: 12px;
            height: 30px;
            line-height: 30px;
            margin-top: 30px;
            background-color: rgb(35, 129, 120);
            border: none;
            outline: none;
            border-radius: 10px;
            color: #fff;
            transition: all .3s;
            box-shadow: 2px 2px 7px rgba(0, 0, 0, .7);
        }
        
        a {
            color: #000;
            text-decoration: none;
            text-align: center;
        }
        
        form>button:active,
        form a:active {
            background-color: rgb(27, 94, 87);
            box-shadow: 1px 1px 3px rgba(0, 0, 0, .9), inset 2px 2px 7px rgba(0, 0, 0, .7);
        }
    </style>
</head>

<body>
    <div class="container">
        <form method="POST" class="left-cont">
            <h1>请选择班级:</h1>
            <select name="class_id">
           <foreach name='major_info' item='v'>
               <foreach name="v.Class" item='vv' key='k'>
                    <option value="{$vv.class_id}" <eq name='class_id' value='$vv.class_id'>selected</eq>>{$v.major_name}&nbsp;{$vv.class_name}</option>
               </foreach>
           </foreach>
        </select>
            <button type="submit">确定</button>
            <a href="__CONTROLLER__/addStudent/class_id/{$class_id}">添加学生</a>
        </form>
        <div class="right-cont">
            <table>
                <thead class="thead">
                    <th>学号</th>
                    <th>名字</th>
                    <th>性别</th>
                    <th>出生年月</th>
                    <th>操作</th>
                </thead>
                <notempty name="student_info">
                    <tbody>
                        <foreach name="student_info" item="v">
                            <tr class="tbtr">
                                <td class="tbtd">{$v.student_number}</td>
                                <td class="tbtd">{$v.student_name}</td>
                                <td class="tbtd">{$v.student_gender}</td>
                                <td class="tbtd">{$v.student_birthday}</td>
                                <td class="tbtd">
                                    <a href="__CONTROLLER__/update/student_id/{$v.student_id}">编辑</a>
                                    <a onclick="javascript:confirm('确定删除吗')" href="__CONTROLLER__/delete/student_id/{$v.student_id}">删除</a>
                                </td>

                            </tr>
                        </foreach>
                        <else/>
                        <tr>
                            <td>查询结果不存在</td>
                        </tr>
                    </tbody>
                </notempty>
            </table>
        </div>
    </div>
</body>

</html>